package com.mall_main.config;

import com.netflix.client.config.DefaultClientConfigImpl;
import com.netflix.client.config.IClientConfig;
import com.netflix.client.config.IClientConfigKey;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Map;
@Configuration
public class RobbinConfig implements IClientConfig {

    public IClientConfig robbinConfig(){
        // 创建 Ribbon 客户端配置的默认实现
        DefaultClientConfigImpl config = new DefaultClientConfigImpl();
//
//        // 这里可以根据需要设置自定义的配置参数，比如连接超时、读取超时等
//        // 设置连接超时，单位毫秒
//        config.setProperty(DefaultClientConfigImpl.ConnectTimeout, 5000);
//        // 设置读取超时，单位毫秒
//        config.setProperty(DefaultClientConfigImpl.ReadTimeout, 3000);

        return config;

    }
    @Override
    public String getClientName() {
        return null;
    }

    @Override
    public String getNameSpace() {
        return null;
    }

    @Override
    public void loadProperties(String s) {

    }

    @Override
    public void loadDefaultValues() {

    }

    @Override
    public Map<String, Object> getProperties() {
        return null;
    }

    @Override
    public void setProperty(IClientConfigKey iClientConfigKey, Object o) {

    }

    @Override
    public Object getProperty(IClientConfigKey iClientConfigKey) {
        return null;
    }

    @Override
    public Object getProperty(IClientConfigKey iClientConfigKey, Object o) {
        return null;
    }

    @Override
    public boolean containsProperty(IClientConfigKey iClientConfigKey) {
        return false;
    }

    @Override
    public String resolveDeploymentContextbasedVipAddresses() {
        return null;
    }

    @Override
    public int getPropertyAsInteger(IClientConfigKey iClientConfigKey, int i) {
        return 0;
    }

    @Override
    public String getPropertyAsString(IClientConfigKey iClientConfigKey, String s) {
        return null;
    }

    @Override
    public boolean getPropertyAsBoolean(IClientConfigKey iClientConfigKey, boolean b) {
        return false;
    }

    @Override
    public <T> T get(IClientConfigKey<T> iClientConfigKey) {
        return null;
    }

    @Override
    public <T> T get(IClientConfigKey<T> iClientConfigKey, T t) {
        return null;
    }

    @Override
    public <T> IClientConfig set(IClientConfigKey<T> iClientConfigKey, T t) {
        return null;
    }
}
